package categories

import (
	"github.com/gin-gonic/gin"
	"net/http"
	"ppa/model"
)

// GetCategoriesList
// @Summary 返回所有可用分类
// @Tags NFT分类
// @Produce  json
// @Description 返回所有可用分类
// @Success 200   {object} model.Categories
// @Router /categories/list [get]
func GetCategoriesList(c *gin.Context) {
	var categories model.Categories
	resData,err:= categories.GetCategoriesList()
	if err != nil {
		c.JSON(http.StatusLengthRequired,gin.H{"message":err.Error()})
		return
	}
	c.JSON(http.StatusOK,gin.H{"data":resData})
	return
}
